app.controller('baseController' ,function($scope){
    //分页控件配置
    $scope.paginationConf = {
        currentPage: 1,
        totalItems: 10,
        itemsPerPage: 3,
        perPageOptions: [3, 5, 10, 20],
        onChange: function(){
            $scope.reloadList();//重新加载
        }
    };
    $scope.reloadList=function(){
        //切换页码
        $scope.findPage( $scope.paginationConf.currentPage, $scope.paginationConf.itemsPerPage);
    }
    $scope.searchEntity={};//定义搜索对象

    $scope.selectIds=[];//选中的ID集合
    //更新复选
    $scope.updateSelection = function($event, id) {
        if($event.target.checked){//如果是被选中,则增加到数组
            $scope.selectIds.push( id);
        }else{
            var idx = $scope.selectIds.indexOf(id);
            $scope.selectIds.splice(idx, 1);//删除
        }
    }
    //全选、反选
    $scope.selectAll=function ($event) {
        $scope.checkbox=$event.target.checked;
    }
});